package com.ruoyi.hr.service;

import com.ruoyi.hr.domain.Departments;
import com.ruoyi.hr.domain.JUser;
import com.ruoyi.hr.domain.Tree;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

public interface DepartmentsService {
    public List<String> findSubdepartmentID(List<String> AllID);

    /**
     * 获取所有部门信息
     * @return
     */
    public List<Departments> findAllDepart();



    /**
     * 根据公司ID获取下属部门
     * @return
     */
    public List<Departments> findDep(Long compID);

    /**
     * 获取分页部门信息
     * @return
     */
    public List<Departments> findAll(int PageNum,int PageSize, Departments departments,List<String> AllID);


    /**
     * 根据部门ID获取部门信息
     * @return
     */
    public Departments findDepOne(Long depID);

    /**
     * 获取部门总数
     * @return
     */
    public int findCount(Departments departments,List<String> AllID);

    /**
     * 保存部门信息
     *
     * @param departments 部门信息
     * @return 结果
     */
    public int updateDepartments(Departments departments);


    /**
     * 新增部门信息
     *
     * @param departments 部门信息
     * @return 结果
     */
    public int insertDepartments(Departments departments);


    public Tree<T> findAllTree(List<String> AllID, String CompID,String type);


    /**
     * 根据部门ID获取父部门ID
     *
     * @param depID 岗位ID
     * @return 结果
     */
    public Departments findadminDep(Long depID);

    /**
     * 获取所有生效岗位用逗号隔开
     */
    public List<String> getDepRow();
}
